<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String BASE_PATH = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>全国企业风险库</title>
    <link rel="stylesheet" href="${BASE_PATH}static/css/commen.css"/>
    <link rel="stylesheet" href="${BASE_PATH}static/css/public.css"/>
    <link rel="stylesheet" href="${BASE_PATH}static/css/searchDetail.css"/>
</head>
<body>
<div class="g_coun_head">
    <div class="g_coun_head_main clearfix">
        <a class="g_c_h_m_logo fl" href="${BASE_PATH}index.jsp"></a>
        <ul class="g_c_h_m_lists fl">
            <li class="active"><a href="${BASE_PATH}index.jsp">首页</a></li>
            <li><a href="${BASE_PATH}businessRisk.jsp">企业风险榜单</a></li>
            <li><a href="${BASE_PATH}focus.jsp">企业风险聚焦</a></li>
        </ul>
        <div class="g_c_h_m_user fr">
            <a href="" class="g_c_h_m_login fl">登录</a>
            <a href="" class="g_c_h_m_registe active fl">免费注册</a>
        </div>
    </div>
    <p class="g_coun_h_shandow"></p>
</div>
<div class="g_sd_main_bg">
    <input type="hidden" value="1" id="comId">
    <div class="g_sd_main clearfix">
        <div class="g_sd_m_l fl">
            <div class="g_sd_m_l_t">
                <p class="g_sd_m_l_t_searchbg clearfix">
                    <input type="" name="" id="" value="小米科技" class="g_sd_m_l_t_search fl"/>
                    <input type="button" name="" id="" value="查处罚" class="g_sd_m_l_t_sub"/>
                </p>
                <div class="g_sd_m_l_t_s_title">
                    <h3 id="companyName"></h3>
                    <h3>企业风险报告</h3>
                </div>

                <div class="g_sd_m_l_b clearfix">
                    <div class="g_sd_m_l_t_l fl" id="g_sd_m_l_t_l">
                        <div class="g_sd_m_l_t_l_tit">风险高于<span class="g_sd_m_l_t_l_tit_num"><span
                                id="riskratio"></span>%</span>的同行
                        </div>
                    </div>
                    <div class="g_sd_m_l_t_r fl">
                        <div class="g_sd_m_l_t_r_lists">
                            <div class="g_sd_m_l_t_r_list g_sd_m_l_t_r_l_fir">
                                <p>该公司近五年收到各行政部门<span class="colRed">惩戒总数</span>为&nbsp;<span class="colRed"
                                                                                             id="repcount"></span>&nbsp;条，在<span
                                        class="region"></span>排名第&nbsp;<span class="colRed" id="countregion"></span>&nbsp;名，在国内排名第&nbsp;<span
                                        class="colRed" id="countall"></span>&nbsp;名；
                                </p>
                            </div>
                            <div class="g_sd_m_l_t_r_list g_sd_m_l_t_r_l_se">
                                <p>该公司近五年收到各行政部门<span class="colRed">惩戒金额</span>为&nbsp;<span class="colRed"
                                                                                             id="repmoney"></span>&nbsp;元（人民币），在<span
                                        class="region"></span>排名第&nbsp;<span class="colRed" id="moneyregion"></span>&nbsp;名，在国内排名第&nbsp;<span
                                        class="colRed" id="moneyall"></span>&nbsp;名；
                                </p>
                            </div>
                            <div class="g_sd_m_l_t_r_list g_sd_m_l_t_r_l_thr">
                                <p>该公司近五年案件<span class="colRed">地域分布</span>涉及 &nbsp;<span class="colRed"
                                                                                          id="localnum"></span>&nbsp;个省级行政区域，在<span
                                        class="region"></span>排名第&nbsp;<span class="colRed" id="localregion"></span>&nbsp;名，在国内排名第&nbsp;<span
                                        class="colRed" id="localall"></span>&nbsp;名；
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="g_sd_m_l_m">
                <div class="g_sd_m_l_m_fir scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">处罚概况</span>
                    </p>
                    <div class="g_sd_m_l_m_f_main clearfix">
                        <div class="g_sd_m_l_m_f_m_l fl">
                            <p class="g_sd_m_l_m_f_m_l_p">
                                <span class="g_sd_m_l_m_f_m_l_l fl">处罚总类</span>
                                <span class="g_sd_m_l_m_f_m_l_r fl">处罚数量</span>
                            </p>
                            <div class="g_sd_m_l_m_f_m_l_lists" id="punishListL">
                            </div>
                        </div>
                        <div class="g_sd_m_l_m_f_m_r fl">
                            <p class="g_sd_m_l_m_f_m_l_p">
                                <span class="g_sd_m_l_m_f_m_r_l fl">处罚总类</span>
                                <span class="g_sd_m_l_m_f_m_r_r fl">处罚数量</span>
                            </p>
                            <div class="g_sd_m_l_m_f_m_l_lists" id="punishListR">
                            </div>
                        </div>
                    </div>
                    <div class="g_sd_m_l_data" id="serDet_data"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">法院公告</span>
                    </p>
                    <div id="courtNotice"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">裁判文书</span>
                    </p>
                    <div id="adjIns"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">失信人信息</span>
                    </p>
                    <div id="dishPer"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">被执行人信息</span>
                    </p>
                    <div id="exePer"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">工商处罚</span>
                    </p>
                    <div id="busAdmRisk"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">海关处罚</span>
                    </p>
                    <div id="cusRisk"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">税务处罚</span>
                    </p>
                    <div id="taxRisk"></div>
                </div>
                <div class="g_sd_m_l_m_sec scrollBox">
                    <p class="g_sd_m_l_m_f_title clearfix">
                        <i class="fl"></i>
                        <span class="fl">财政处罚</span>
                    </p>
                    <div id="finRisk"></div>
                </div>
            </div>
        </div>
        <div class="g_sd_m_r fl">
            <div class="g_sd_m_r_t">
                <p class="g_sd_m_r_t_title clearfix">
                    <i class="fl"></i>
                    <span class="fl">报告下载</span>
                </p>

                <div class="g_sd_m_r_t_t_down"></div>
                <p class="g_sd_m_r_t_t_cli">下载企业风险信息报告</p>
            </div>
            <div class="g_sd_m_r_t">
                <p class="g_sd_m_r_t_title clearfix">
                    <i class="fl"></i>
                    <span class="fl">企业简介</span>
                </p>
                <div id="comDetail">
                </div>

                <p class="g_sd_m_r_t_t_b_show">
                    <span>展开</span>
                    <span class="hide">收起</span>
                </p>
            </div>
            <div class="g_sd_m_r_t">
                <p class="g_sd_m_r_t_title clearfix g_sd_m_r_t_t_big">
                    <i class="fl"></i>
                    <span class="fl">处罚图谱</span>
                </p>

                <div class="g_sd_m_r_t_t_bus_pun">
                </div>
                <p class="g_sd_m_r_t_t_bus_p_text">企业、行政部门、关联企业三者关联关系</p>
            </div>
            <div class="g_sd_m_r_t">
                <p class="g_sd_m_r_t_title clearfix">
                    <i class="fl"></i>
                    <span class="fl">企业舆情</span>
                    <span class="fr g_sd_m_r_t_looks">查看全部></span>
                </p>
                <div id="comPubSent">
                </div>
            </div>
        </div>
        <div class="scrollB hide" id="scrollB">
            <p class="scrollBox_tit">快速查询</p>
            <ul class="scrollBox_listUl">
                <li class="scrollBox_listActive">
                    <span class="scrBox_icon scrBox_icon1 fl"></span>
                    <span>处罚概况</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon3 fl"></span>
                    <span>法院公告</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon4 fl"></span>
                    <span>裁判文书</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon5 fl"></span>
                    <span>失信人</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon6 fl"></span>
                    <span>被执行人</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon7 fl"></span>
                    <span>工商处罚</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon8 fl"></span>
                    <span>海关处罚</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon9 fl"></span>
                    <span>税务处罚</span>
                </li>
                <li>
                    <span class="scrBox_icon scrBox_icon10 fl"></span>
                    <span>财政处罚</span>
                </li>
            </ul>
        </div>
    </div>
</div>

<div class="g_coun_foot">
    <div class="g-coun_borBott">
        <div class="g_coun_f_main">
            <div class="g_coun_f_m_top clearfix">
                <div class="g_coun_f_m_t_l fl">
                    <h2 class="g_coun_f_m_t_title fl">企业风险</h2>
                    <ul class="g_coun_f_m_t_list fl">
                        <li>关于我们</li>
                        <li>免责声明</li>
                        <li>服务协议</li>
                        <li>权利通知</li>
                        <li>意见反馈</li>
                        <li>数据服务</li>
                        <li>常见问题</li>
                        <li> 版权声明</li>
                    </ul>
                </div>
                <div class="g_coun_f_m_t_c fl">
                    <h2 class="g_coun_f_m_t_title">联系我们</h2>

                    <p>企业邮箱：xxxxxx@xxxxx.com</p>

                    <p>客服电话：888888888</p>
                </div>
                <div class="g_coun_f_m_t_r fr">
                    <div class="fl g_coun_f_m_t_r_l">
                        <p class="g_coun_f_m_t_r_l_title">微信公众号</p>

                        <p class="g_coun_f_m_t_r_l_pic"></p>
                    </div>
                    <div class="fl g_coun_f_m_t_r_l">
                        <p class="g_coun_f_m_t_r_l_title">征信查APP</p>

                        <p class="g_coun_f_m_t_r_l_pic"></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="g-coun_borTop">
        <div class="g_coun_f_main">
            <div class="g_coun_f_m_bottom">
                <p>版权所有：xxxxxxxxx@2016 JINDIDATA 京ICP备 xxxxxxx</p>

                <p>京公网安备 11010802021795号</p>
            </div>
        </div>
    </div>
</div>
<div class="popup hide">
    <div class="popup_bg"></div>
    <div class="popup_con" id="popup_con">
        <!-- <div class="popup_main">
            <div class="popup_tit">
                <p class="popup_title">法院公告详细信息</p>
                <span class="popup_close"></span>
            </div>
            <div class="popup_mainCon">
                <p>
                    <span class="popup_type"><span>公告类型：</span><span>裁判文书</span></span>
                    <span class="popup_time"><span>公告日期：</span><span>2015年12月31日</span></span>
                </p>

                <p>
                    <span>当事人：</span><span>韩何军、吕永华</span>
                </p>
                <p>
                    <span>公告人：</span><span>重庆市工商行政管理局九龙坡区分局</span>
                </p>
                <p class="popup_line40">
                    <span>公告内容：</span><span>重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局重庆市工商行政管理局九龙坡区分局</span>
                </p>
            </div>
        </div> -->
    </div>
</div>
<script src="${BASE_PATH}static/js/jquery-1.10.2.min.js"></script>
<script src="${BASE_PATH}static/js/echarts.min.js"></script>
<script src="${BASE_PATH}static/js/searDet.js"></script>
<script>
    var comDetaUrl = '${BASE_PATH}risk/businessDetails'; //企业详情接口
    var punishListUrl = '${BASE_PATH}risk/punishList'; //处罚列表接口
    var comyPubUrl = '${BASE_PATH}risk/businessPublicOption'; //企业舆情接口
    $(function () {
        $(document).on('scroll', function (event, delta, deltaX, deltaY) {
            var top = $(this).scrollTop(); // 当前窗口的滚动距离
            var L0 = $(".scrollBox").eq(0).offset().top;
            if (top >= L0) {
                $("#scrollB").removeClass("hide");
            } else {
                $("#scrollB").addClass("hide");
            }
            var L1 = $(".scrollBox").eq(1).offset().top;
            var L2 = $(".scrollBox").eq(2).offset().top;
            var L3 = $(".scrollBox").eq(3).offset().top;
            var L4 = $(".scrollBox").eq(4).offset().top;
            var L5 = $(".scrollBox").eq(5).offset().top;
            var L6 = $(".scrollBox").eq(6).offset().top;
            var L7 = $(".scrollBox").eq(7).offset().top;
            var L8 = $(".scrollBox").eq(8).offset().top;
            if (top > L0 && top < L1) {
                $(".scrollBox_listUl").find("li").eq(0).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(0).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L1 && top < L2) {
                $(".scrollBox_listUl").find("li").eq(1).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(1).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L2 && top < L3) {
                $(".scrollBox_listUl").find("li").eq(2).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(2).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L3 && top < L4) {
                $(".scrollBox_listUl").find("li").eq(3).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(3).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L4 && top < L5) {
                $(".scrollBox_listUl").find("li").eq(4).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(4).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L5 && top < L6) {
                $(".scrollBox_listUl").find("li").eq(5).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(5).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L6 && top < L7) {
                $(".scrollBox_listUl").find("li").eq(6).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(6).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L7 && top < L8) {
                $(".scrollBox_listUl").find("li").eq(7).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(7).siblings("li").removeClass("scrollBox_listActive");
            } else if (top > L8) {
                $(".scrollBox_listUl").find("li").eq(8).addClass("scrollBox_listActive");
                $(".scrollBox_listUl").find("li").eq(8).siblings("li").removeClass("scrollBox_listActive");
            }
        });
        $(".scrollBox_listUl li").click(function () {
            $(this).addClass("scrollBox_listActive");
            $(this).siblings("li").removeClass("scrollBox_listActive");
            var index = $(this).index();
            var l = $(".scrollBox").eq(index).offset().top;
            document.body.scrollTop = l;
        });
        //弹出层的关闭事件
        $(".popup").on("click", ".popup_close", function () {
            $(this).parents(".popup").addClass("hide");
        });
        //展开收起事件
        $(".g_sd_m_r_t_t_b_show").click(function () {
            $(this).toggleClass("g_sd_down");
            $(this).find("span.hide").removeClass("hide").siblings("span").addClass("hide");
            $("#comDetail").find("p.g_sd_hide").toggleClass("hide");
        });

        showDetail();//企业风险报告和企业简介信息
        punishListFun(1, 1);//展示种类类型对应信息1-法院公告2-裁判文书3-失信人信息4-被执行人信息5-工商处罚6-税务处罚7-海关处罚8-财政处罚
        punishListFun(2, 1);
        punishListFun(3, 1);
        punishListFun(4, 1);
        punishListFun(5, 1);
        punishListFun(6, 1);
        punishListFun(7, 1);
        punishListFun(8, 1);
        comyPubSent();//企业舆情
    });
    function showDetail() {
//        var comId = $("#comId").val();
        var comId = sessionStorage.getItem("company_id");
        $.ajax({
            url: comDetaUrl,
            type: 'post',
            data: {
                id: comId
            },
            dataType: 'json',
            success: function (data) {
                var data1 = data.data;
                var comDetail = //企业简介
                        '<div class="g_sd_m_r_t_t_busiLogo">' +
                        '	<img src="' + data1.compimg + '"/>' +
                        '</div>' +
                        '<p class="g_sd_m_r_t_t_b_text">' + data1.company + '</p>' +
                        '<div class="g_sd_m_r_t_t_b_infor">' +
                        '	<p>法定代表人：' + data1.corporation + '<span class="mar26">状态：<span class="g_sd_m_r_t_t_b_i_state">' + data1.state + '</span></p>' +
                        '	<p>行业：' + data1.trade + '</p>' +
                        '	<p>企业类型：' + data1.comptype + '</p>' +
                        '	<p class="g_sd_hide hide">营业期限：<span class="g_sd_m_r_t_t_b_i_red">' + data1.license + '</span></p>' +
                        '	<p class="g_sd_hide hide">核准日期：<span class="g_sd_m_r_t_t_b_i_red">' + data1.approvedate + '</span></p>' +
                        '	<p class="g_sd_hide hide">注册地址：' + data1.address + '</p>' +
                        '</div>';
                var punishHtmlL = "";//处罚概况左侧
                var punishHtmlR = "";//处罚概况右侧
                var name1 = [];
                var value1 = [];
                $.each(data1.punish, function (i, item) {
                    if (i < 5) {
                        punishHtmlL += '<p class="clearfix">' + item.name + '数量：<span>' + item.number + '</span></p>';
                    } else {
                        punishHtmlR += '<p class="clearfix">' + item.name + '数量：<span>' + item.number + '</span></p>';
                    }
                    var json1 = {};
                    name1.push(item.name);
                    json1.name = item.name;
                    json1.value = item.number;
                    value1.push(json1);
                })
                $("#punishListL").html(punishHtmlL);//处罚概况左侧
                $("#punishListR").html(punishHtmlR);//处罚概况右侧
                $("#comDetail").html(comDetail);//企业简介
                $("#companyName").html(data1.company);//企业名称
                $(".region").html(data1.region);//所在地区
                $("#repcount").html(data1.repcount);//惩戒总数
                $("#countregion").html(data1.countregion);//惩戒总数所在地区排名
                $("#countall").html(data1.countall);//惩戒总数国内排名
                $("#repmoney").html(data1.repmoney);//惩戒金额
                $("#moneyregion").html(data1.moneyregion);//惩戒金额所在地区排名
                $("#moneyall").html(data1.moneyall);//惩戒金额国内排名
                $("#localnum").html(data1.localnum);//地域分布涉及数量
                $("#localregion").html(data1.localregion);//地域分布所在地区排名
                $("#localall").html(data1.localall);//地域分布国内排名
                $("#riskratio").html(data1.riskratio);//同行风险比
                if (data1.riskratio <= 20) {
                    $(".g_sd_m_l_t_l").addClass("g_sd_m_l_t_l1");
                } else if (data1.riskratio > 20 && data1.riskratio <= 40) {
                    $(".g_sd_m_l_t_l").addClass("g_sd_m_l_t_l2");
                } else if (data1.riskratio > 40 && data1.riskratio <= 60) {
                    $(".g_sd_m_l_t_l").addClass("g_sd_m_l_t_l3");
                } else if (data1.riskratio > 60 && data1.riskratio <= 80) {
                    $(".g_sd_m_l_t_l").addClass("g_sd_m_l_t_l4");
                } else {
                    $(".g_sd_m_l_t_l").addClass("g_sd_m_l_t_l5");
                }
                myChart2.setOption({
                    legend: {
                        data: name1
                    },
                    series: [
                        {
                            data: value1
                        }
                    ]
                });
            }
        })
    }

    function punishListFun(punType, order) {//punType处罚类型1-法院公告2-裁判文书3-失信人信息4-被执行人信息5-工商处罚6-税务处罚7-海关处罚8-财政处罚
        var pageNo = order;//查询第几页数
        var pageSize = 3;//每页显示记录数
        var data = {
            pageNo: pageNo,
            pageSize: pageSize,
            type: punType,
            id: sessionStorage.getItem("company_id")
        }
        $.ajax({
            url: punishListUrl,
            type: 'post',
            data: data,
            dataType: 'json',
            success: function (data) {
                var pageHtml = //分页
                        '<div class="g_sd_m_l_m_s_page page clearfix">' +
                        '	<ul class="fl">';
                var page = Math.ceil(data.totalRow / data.pageSize);
                var minPageNo = 0;
                var maxPageNo = 9;
                if (page > 10 && pageNo > 6) {
                    minPageNo = pageNo - 5;
                    maxPageNo = pageNo + 5;
                    if (page - maxPageNo <= 2) {
                        maxPageNo = page;
                        minPageNo = page - 9;
                    }
                }
                for (var int = 1; int <= page; int++) {
                    // 获取页码和当前页码
                    if (data.pageNumber == int) {
                        pageHtml += "<li class='page_action'>" + int + "</li>";
                    } else {
                        if (int >= minPageNo && int <= maxPageNo) {
                            pageHtml += "<li onclick='punishListFun(" + punType + "," + int + ")'>" + int + "</li>";
                        } else {
                            if (int > maxPageNo) {
                                pageHtml += "<li>...</li><li onclick='punishListFun(" + punType + "," + page + ")'>" + page + "</li>";
                                int = page;
                            }
                            if (int < minPageNo) {
                                pageHtml += "<li onclick='punishListFun(" + punType + "," + int + ")'>" + int + "</li><li>...</li>";
                                int = minPageNo;
                            }
                        }
                    }
                }
                // 判断是否是第一页
                if (data.pageNumber != 1) {
                    pageHtml += "<li onclick='punishListFun(" + punType + "," + (data.pageNumber - 1) + ")'>&lt;</li>";
                }
                // 页数是否已加载完成
                // 判断是否是最后一页
                if (data.pageNumber != page) {
                    pageHtml += "<li onclick='punishListFun(" + punType + "," + (parseInt(data.pageNumber) + 1) + ")'>&gt;</li>";
                }
                pageHtml +=//
                        '	</ul>' +
                        '	<p class="fr page_all">共&nbsp;<span class="page_num">' + data.totalRow + '</span>&nbsp;条记录</p>' +
                        '</div>';
                var punHtml = "";
                if (punType == 1) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business fl" title="' + item.filed4 + '">发布时间：<span>' + filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：<span>' +filterField("filed5",item.filed5) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_time" title="' + item.filed3 + '">当事人: ' + filterField("filed3",item.filed3) + '</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#courtNotice").html(punHtml);
                } else if (punType == 2) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' +filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' +filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' +filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' +filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：<span>' + filterField("filed5",item.filed5) + '</span></span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#adjIns").html(punHtml);
                } else if (punType == 3) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' +filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' +filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' + filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' +filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#dishPer").html(punHtml);
                } else if (punType == 4) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' +filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' +filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' +filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' +filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#exePer").html(punHtml);
                } else if (punType == 5) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//工商处罚
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' + filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' + filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' + filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#busAdmRisk").html(punHtml);
                } else if (punType == 6) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//海关处罚
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' + filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' + filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' + filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#cusRisk").html(punHtml);
                } else if (punType == 7) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//税务处罚
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' + filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' + filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' + filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#taxRisk").html(punHtml);
                } else if (punType == 8) {
                    $.each(data.data, function (i, item) {
                        punHtml +=//财政处罚
                                '<div class="g_sd_m_l_m_s_t">' +
                                '	<p class="g_sd_m_l_m_s_list">' +
                                '		<span class="g_sd_m_l_m_s_t_text" title="' + item.filed1 + '">处罚名称：' + filterField("filed1",item.filed1) + '</span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed2 + '">文书号：' + filterField("filed2",item.filed2) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed4 + '">发布时间：<span>' + filterField("filed4",item.filed4) + '</span></span>' +
                                '	</p>' +
                                '	<p class="g_sd_m_l_m_s_list clearfix">' +
                                '		<span class="g_sd_m_l_m_s_t_type fl" title="' + item.filed3 + '">当事人：' + filterField("filed3",item.filed3) + '</span>' +
                                '		<span class="g_sd_m_l_m_s_t_business_t fl" title="' + item.filed5 + '">决定机关：' + filterField("filed5",item.filed5) + '</span>' +
                                '	</p>' +
                                '	<span class="g_sd_m_l_m_s_t_detail fl" onclick="punDetails(' + item.id + ',' + punType + ');">查看详情</span>' +
                                '</div>';
                    })
                    punHtml += pageHtml;
                    $("#finRisk").html(punHtml);
                }
            }
        })
    }
    //企业舆情
    function comyPubSent() {
        //comyPubUrl
        $.ajax({
            url: comyPubUrl,
            type: 'post',
            dataType: 'json',
            success: function (data) {
                var pubSentHtml = "";//
                $.each(data.data, function (i, item) {
                    pubSentHtml +=//
                            '<div class="g_sd_m_r_t_t_pubsen">' +
                            '	<p>' + item.title + '</p>' +
                            '	<div class="g_sd_m_r_t_t_list clearfix">' +
                            '			<span class="g_sd_m_r_t_t_l_data fl">' +
                            '				 <span>' + item.commentnum + '</span>条' +
                            '			</span>' +
                            '		<span class="g_sd_m_r_t_t_l_time fl">' + item.date + '</span>' +
                            '	</div>' +
                            '</div>';
                })
                $("#comPubSent").html(pubSentHtml);
            },
            error: function (error) {
                alert("error");
                console.log(error);
            }
        })
    }
    //查看详情
    function punDetails(id, type) {
        var punishDetailUrl = '${BASE_PATH}risk/punishDetails' //处罚详情接口
        var data = {
            id: id,
            type: type
        };
        $.ajax({
            url: punishDetailUrl,
            type: 'post',
            data: data,
            dataType: 'json',
            success: function (data) {
                var detailHtml =//
                        '<div class="popup_main">' +
                        '	<div class="popup_tit">' +
                        '		<p class="popup_title">' + data.data.title + '</p>' +
                        '		<span class="popup_close"></span>' +
                        '	</div>' +
                        '	<div class="popup_mainCon">' +
                        '		<p>' + data.data.content + '</p>' +
                        '	</div>' +
                        '</div>';
                $("#popup_con").html(detailHtml);
                $(".popup").removeClass("hide");
            },
            error: function (error) {
                alert("error");
                console.log(error);
            }
        })
    }

    //处理字段长度过大
    function filterField(field_key, value) {
        var str = "";
        if ("filed1" == field_key)
            str = value.length > 44 ? value.substring(0, 44)+"..." : value;
        else if ("filed2" == field_key)
            str = value.length > 17 ? value.substring(0, 17)+"..." : value;
        else if ("filed3" == field_key)
            str = value.length > 17 ? value.substring(0, 17)+"..." : value;
        else if ("filed4" == field_key)
            str = value.length > 17 ? value.substring(0, 17)+"..." : value;
        else if ("filed5" == field_key)
            str = value.length > 17 ? value.substring(0, 17)+"..." : value;
        return str;
    }
</script>
</body>
</html>
